#ifndef REMOTECLIENT_H
#define REMOTECLIENT_H

#include "remotetcpsocket.h"

///
/// \brief The RemoteClient class
///
/// 用于图像接收端使用
class EREMOTEPROTOCOLSHARED_EXPORT RemoteClient : public RemoteTcpSocket
{
    Q_OBJECT
public:
    explicit RemoteClient(QObject *parent = nullptr);
    virtual ~RemoteClient() override;

    bool sendKey(int wid, int key, bool isPress);
    bool sendMouse(int wid, int button, bool isPress, int x, int y);
    bool sendWheel(int wid, int delta);
    bool sendStartCap(int wid);
    bool sendStopCap(int wid);
    bool sendCutText(const QString &text);
protected:
    virtual void parsePacket(QByteArray &pkt) override;
signals:
    void receivedCreateWindow(int wid, int width, int height, int codec);
    void receivedCloseWindow(int wid);
    void receivedResizeWindow(int wid, int width, int height, int coedc);
    void receivedFramebuffer(int wid, const QByteArray &framebuffer);

    void receivedCutText(const QString &text);
};

#endif // REMOTECLIENT_H
